Skip to content

feat: allow disabling sign-in link behavior#66

Merged
mhamann merged 1 commit into
mainfrom
feat-disable-signinlink-behavior
Oct 27, 2025
Merged

feat: allow disabling sign-in link behavior#66
mhamann merged 1 commit into
mainfrom
feat-disable-signinlink-behavior

Conversation

@mhamann
Copy link
Copy Markdown
Contributor

@mhamann mhamann commented Oct 27, 2025

Summary by Sourcery

Introduce a configuration flag to enable or disable automatic magic link sign-in from the clipboard and apply it in the sign-in link flow.

Enhancements:

  • Add enableSmartLinkPasteBehavior flag to RowndConfig with default true and inject RowndConfig into SignInLinkApi.
  • Guard the automatic clipboard-based sign-in behavior on the new configuration flag in SignInLinkApi.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Oct 27, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a feature toggle to disable the automatic smart-paste sign-in link fallback by injecting app config into the sign-in link API and introducing a new flag in RowndConfig.

Entity relationship diagram for RowndConfig and SignInLinkApi

erDiagram
    ROWND_CONFIG {
        Boolean forceInstantUserConversion
        Boolean enableDebugMode
        Boolean enableSmartLinkPasteBehavior
    }
    SIGN_IN_LINK_API {
        KtorApiClient apiClient
        RowndConfig config
    }
    SIGN_IN_LINK_API ||--|| ROWND_CONFIG : injects
Loading

Class diagram for updated RowndConfig and SignInLinkApi

classDiagram
    class RowndConfig {
        +Boolean forceInstantUserConversion
        +Boolean enableDebugMode
        +Boolean enableSmartLinkPasteBehavior
        +String getApiBaseUrl()
    }
    class SignInLinkApi {
        +KtorApiClient apiClient
        +RowndConfig config
        +SignInLink createSignInLink()
        +void handleSignInLinkIntent(ctx)
    }
    SignInLinkApi --> RowndConfig : uses
Loading

File-Level Changes

Change Details Files
Introduce configurable smart link paste behavior in SignInLinkApi
  • Inject RowndConfig into SignInLinkApi
  • Wrap fallback clipboard sign-in logic with enableSmartLinkPasteBehavior guard
  • Preserve existing window-focus and layout-based logic under the feature flag
android/src/main/java/io/rownd/android/models/network/SignInLink.kt
Add enableSmartLinkPasteBehavior flag to RowndConfig
  • Declare transient Boolean enableSmartLinkPasteBehavior with default true
android/src/main/java/io/rownd/android/models/RowndConfig.kt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Simplify the nested control flow by checking enableSmartLinkPasteBehavior early (and returning if false) to reduce indentation.
  • Extract the clipboard-paste logic into a single helper method to remove duplication between the focus and layout branches.
  • Review the use of @transient on enableSmartLinkPasteBehavior—if you need this flag to be persisted or driven by remote config, it shouldn’t be marked transient.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Simplify the nested control flow by checking enableSmartLinkPasteBehavior early (and returning if false) to reduce indentation.
- Extract the clipboard-paste logic into a single helper method to remove duplication between the focus and layout branches.
- Review the use of @Transient on enableSmartLinkPasteBehavior—if you need this flag to be persisted or driven by remote config, it shouldn’t be marked transient.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@mhamann mhamann merged commit cdf26ce into main Oct 27, 2025
7 checks passed
@mhamann mhamann deleted the feat-disable-signinlink-behavior branch October 27, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants